package com.weixingtu.commuterCar.bean;

import java.util.Objects;

public class Point {
    private int objId;
    private double lat;//wgs84纬度
    private double lng;//wgs84经度
    private int lineId;
    private String lineName;

    public Point() {
    }

    public Point(int objId, double lat, double lng, int lineId, String lineName) {
        this.objId = objId;
        this.lat = lat;
        this.lng = lng;
        this.lineId = lineId;
        this.lineName = lineName;
    }

    @Override
    public String toString() {
        return "Point{" +
                "objId=" + objId +
                ", lat=" + lat +
                ", lng=" + lng +
                ", lineId=" + lineId +
                ", lineName='" + lineName + '\'' +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Point point = (Point) o;
        return objId == point.objId &&
                Double.compare(point.lat, lat) == 0 &&
                Double.compare(point.lng, lng) == 0 &&
                lineId == point.lineId &&
                Objects.equals(lineName, point.lineName);
    }

    @Override
    public int hashCode() {
        return Objects.hash(objId, lat, lng, lineId, lineName);
    }

    public int getObjId() {
        return objId;
    }

    public void setObjId(int objId) {
        this.objId = objId;
    }

    public double getLat() {
        return lat;
    }

    public void setLat(double lat) {
        this.lat = lat;
    }

    public double getLng() {
        return lng;
    }

    public void setLng(double lng) {
        this.lng = lng;
    }

    public int getLineId() {
        return lineId;
    }

    public void setLineId(int lineId) {
        this.lineId = lineId;
    }

    public String getLineName() {
        return lineName;
    }

    public void setLineName(String lineName) {
        this.lineName = lineName;
    }
}
